Texture InputTexture;

sampler inputTexture = sampler_state 
{ 
    texture = <InputTexture>; 
    magfilter = LINEAR; 
    minfilter = LINEAR; 
    mipfilter = LINEAR; 
};
 
struct VS_OUTPUT
{
	float4 Position	: POSITION;
	float2 TexCoords : TEXCOORD0;
};
 
float4 Invert_PS (VS_OUTPUT Input) : COLOR0
{
	float4 color = tex2D(inputTexture, Input.TexCoords);
	color.r = 1.0 - color.r;
	color.g = 1.0 - color.g;
	color.b = 1.0 - color.b;
	color.a = 1.0;
	return color;
}
 
technique Invert
{
	pass P0
	{
		PixelShader = compile ps_2_0 Invert_PS();
	}
}